// source --> https://sevenplast.biz/wp-content/plugins/catch-infinite-scroll/public/js/catch-infinite-scroll-public.js?ver=1.7.9 (function ($) { 'use strict'; /** * All of the code for your public-facing JavaScript source * should reside in this file. * * Note: It has been assumed you will write jQuery code here, so the * $ function reference has been prepared for usage within the scope * of this function. * * This enables you to define handlers, for when the DOM is ready: * * $(function() { * * }); * * When the window is loaded: * * $( window ).load(function() { * * }); * * ...and/or other possibilities. * * Ideally, it is not considered best practise to attach more than a * single DOM-ready or window-load handler for a particular page. * Although scripts in the WordPress core, Plugins and Themes may be * practising this, we should strive to set a better example in our own work. */ window.addEventListener('load', function () { var nextSelector = selector['nextSelector']; var navigationSelector = selector['navigationSelector']; var contentSelector = selector['contentSelector']; var itemSelector = selector['itemSelector']; var themeName = selector.theme; /** Support for TwentyTwenty theme */ if ('' !== contentSelector) { itemSelector = selector['contentSelector'] + ' ' + selector['itemSelector']; } else { itemSelector = selector['itemSelector']; } var destUrl = $(nextSelector).attr('href'); var finished = false; var flag = false; if ( $(nextSelector).length && $(navigationSelector).length && // $(contentSelector).length && $(itemSelector).length ) { $(navigationSelector).css('display', 'none'); $('body').addClass('infinite-scroll'); var trigger = selector['event']; $(itemSelector) .last() .after( '
catch-infinite-scroll-loader
' ); if ('click' == trigger) { $(itemSelector) .last() .after( '
' ); load_on_click(); } else { load_on_scroll(); } $(window).on('scroll', function () { var t = $(this), elem = $(itemSelector).last(); if (typeof elem == 'undefined') { return; } if ( finished && t.scrollTop() + t.height() >= elem.offset().top + elem.height() ) { setTimeout(function () { $('.ctis-finished-notice').fadeOut('slow'); }, 3000); } }); } function ctis_load_more() { $.ajax({ url: destUrl, beforeSend: show_loader(), success: function (results) { if (selector['jetpack_enabled']) { $('.infinite-loader').css('text-indent', '0'); $('.infinite-loader').css('height', 'auto'); } hide_loader(); var obj = $(results); var elem = obj.find(itemSelector); // console.log(elem); var next = obj.find(nextSelector); if (next.length !== 0) { $(nextSelector).attr('href', next.attr('href')); } // var itemClass = selector['itemSelector'].split('.'); elem = elem.each(function (index, value) { var el; if ( $(value).find('img').hasClass('lazy') && $(value).find('img').attr('data-src') !== undefined ) { var src = $(value).find('img').attr('data-src'); $(value) .find('img') .attr('src', src) .removeClass('lazy') .removeAttr('data-src'); } /** Support: Logic for prepending separator in TwentyTwenty theme */ var el; if ('twentytwenty' === themeName) { /* sepp = document.getElementsByClassName('post-separator'); console.log(sepp[0].classList); */ // Create a hr separator as in the theme as using existing element from the DOM didn't work in this theme for some reason var hr = document.createElement('HR'); hr.classList.add('post-separator','styled-separator','is-style-wide','section-inner'); // console.log(hr); // hr.appendChild($(value)); el = $(value).prepend(hr); //el = $(value); } else { el = $(value); } return el; }); elem.each(function (i, v) { $(itemSelector).last().after($(this)); }); // $(itemSelector).trigger('post-load'); if (next.length !== 0 && next.attr('href') != '#') { destUrl = $(nextSelector).attr('href'); } else { finished = true; $('body').addClass('infinity-end'); $('.ctis-load-more-container').hide(); $(itemSelector) .last() .after( '
' + selector['finish_text'] + '
' ); } }, error: function () { hide_loader(); //$(".ctis-finished-notice").html('Error retrieving posts...'); }, }); } function show_loader() { flag = true; $('#ctis-loading').show(); // $('.infinite-loader').show(); $('.ctis-load-more-container').hide(); } function hide_loader() { $('#ctis-loading').hide(); // $('.infinite-loader').hide(); $('.ctis-load-more-container').show(); setTimeout(function () { flag = false; }, 500); } function load_on_scroll() { $(window).on('scroll', function () { var t = $(this), elem = $(itemSelector).last(); if (typeof elem == 'undefined') { return; } if ( flag === false && !finished && t.scrollTop() + t.height() >= elem.offset().top + elem.height() ) { ctis_load_more(); } }); } function load_on_click() { $('body').on('click', '.ctis-load-more', function () { ctis_load_more(); }); } }); })(jQuery); // source --> https://sevenplast.biz/wp-content/plugins/photo-gallery/js/jquery.sumoselect.min.js?ver=3.0.3 /* * jquery.sumoselect - v3.0.3 * http://hemantnegi.github.io/jquery.sumoselect * 2016-12-12 * * Copyright 2015 Hemant Negi * Email : hemant.frnz@gmail.com * Compressor http://refresh-sf.com/ */ (function(factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['jquery'], factory); } else if (typeof exports !== 'undefined') { module.exports = factory(require('jquery')); } else { factory(jQuery); } })(function ($) { 'namespace sumo'; $.fn.SumoSelect = function (options) { /* This is the easiest way to have default options.*/ var settings = $.extend({ placeholder: 'Select Here', /* Dont change it here.*/ csvDispCount: 3, /* display no. of items in multiselect. 0 to display all.*/ captionFormat:'{0} Selected', /* format of caption text. you can set your locale.*/ captionFormatAllSelected:'{0} all selected!', /* format of caption text when all elements are selected. set null to use captionFormat. It will not work if there are disabled elements in select.*/ floatWidth: 400, /* Screen width of device at which the list is rendered in floating popup fashion.*/ forceCustomRendering: false, /* force the custom modal on all devices below floatWidth resolution.*/ nativeOnDevice: ['Android', 'BlackBerry', 'iPhone', 'iPad', 'iPod', 'Opera Mini', 'IEMobile', 'Silk'], outputAsCSV: false, /* true to POST data as csv ( false for Html control array ie. default select )*/ csvSepChar: ',', /* separation char in csv mode*/ okCancelInMulti: false, /* display ok cancel buttons in desktop mode multiselect also.*/ isClickAwayOk: false, /* for okCancelInMulti=true. sets whether click outside will trigger Ok or Cancel (default is cancel).*/ triggerChangeCombined: true, /* im multi select mode whether to trigger change event on individual selection or combined selection.*/ selectAll: false, /* to display select all button in multiselect mode.|| also select all will not be available on mobile devices.*/ search: false, /* to display input for filtering content. selectAlltext will be input text placeholder*/ searchText: 'Search...', /* placeholder for search input*/ noMatch: 'No matches for "{0}"', prefix: '', /* some prefix usually the field name. eg. 'Hello'*/ locale: ['OK', 'Cancel', 'Select All'], /* all text that is used. don't change the index.*/ up: false, /* set true to open upside.*/ showTitle: true /* set to false to prevent title (tooltip) from appearing*/ }, options); var ret = this.each(function () { var selObj = this; /* the original select object.*/ if (this.sumo || !$(this).is('select')) return; /* already initialized*/ this.sumo = { E: $(selObj), /* the jquery object of original select element.*/ is_multi: $(selObj).attr('multiple'), /* if its a multiple select*/ select: '', caption: '', placeholder: '', optDiv: '', CaptionCont: '', ul:'', is_floating: false, is_opened: false, /* backdrop: '', */ mob:false, /* if to open device default select */ Pstate: [], createElems: function () { var O = this; O.E.wrap('